package com.sinven.controller;

import com.sinven.common.ApiResult;
import com.sinven.pojo.Order;
import com.sinven.pojo.Phone;
import com.sinven.service.PhoneService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
@RequestMapping("/Phone")
@Controller
public class PhoneController {
    @Resource

    public PhoneService phoneService;
    @RequestMapping("/payment")
    @ResponseBody
    public ApiResult<Order> payment(Phone phone, int id){
        System.out.println(phone.getPstorage());
        return phoneService.payment(phone,id);
    }
}
